package model;

import java.util.List;

public class Grade {
    //主键自增标识列
    private Integer gradecard;
    //年级名称
    private String gradename;

    //一对多保证两表关系
    private List<Student> students;

    @Override
    public String toString() {
        return "Grade{" +
                "gradecard=" + gradecard +
                ", gradename='" + gradename + '\'' +
                ", students=" + students +
                '}';
    }

    public Integer getGradecard() {
        return gradecard;
    }

    public void setGradecard(Integer gradecard) {
        this.gradecard = gradecard;
    }

    public String getGradename() {
        return gradename;
    }

    public void setGradename(String gradename) {
        this.gradename = gradename;
    }

    public List<Student> getStudents() {
        return students;
    }

    public void setStudents(List<Student> students) {
        this.students = students;
    }

    public Grade() {
    }

    public Grade(Integer gradecard, String gradename, List<Student> students) {
        this.gradecard = gradecard;
        this.gradename = gradename;
        this.students = students;
    }
}
